<?php

namespace App\Http\Controllers\Member;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\Member\DealRecord;

class DealController extends Controller
{
    public function getList(Request $request)
    {
        $dealRecordModel = new DealRecord;
        $data = $dealRecordModel->getList($request);
        
        return $data;
    }

    public function transfer(Request $request){
        $phone = $request->agentPhone;
        $gold = $request->gold;
        $agentId = $request->agentMid;
        $payPwd = $request->payPwd;
        $code = $request->code;

        $deal = new DealRecord;
        $data = $deal->transfer($phone,$gold,$agentId,$payPwd,$code);
        return $data;
    }
}
